import request from '../utils/request.js'

function getALLList (params) {
  return request({
    url: 'http://ttapi.research.itcast.cn/mp/v1_0/user/images',
    method: 'get',
    params
  })
}
function getIsCollect (data) {
  const { id, collect } = data
  return request({
    url: 'http://ttapi.research.itcast.cn/mp/v1_0/user/images/' + id,
    method: 'PUT',
    data: { collect }
  })
}
function removeImg (id) {
  return request({
    url: 'http://ttapi.research.itcast.cn/mp/v1_0/user/images/' + id,
    method: 'DELETE'
  })
}
export { getALLList, getIsCollect, removeImg }
